﻿<%@ Page Language="C#" MasterPageFile="~/webUI/admin/adminTemplate.master" AutoEventWireup="true"
    CodeFile="cucil_info.aspx.cs" Inherits="cucil_info" Title=".::E-Valuation System::.." %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Panel ID="PanelNhapdiem" runat="server">
        <div class="UIDivInfo">
            <div class="UITabPane" style="margin-top: 15px;">
                <div class="TabPaneContent">
                    <div class="WorkingAreaWithHelp" style="width: 98.5%;">
                        <div class="UIHorizontalTabs">
                            <div class="LeftHorizontalTabs">
                                <div class="RightHorizontalTabs">
                                    <div class="CenterHorizontalTabs">
                                        <div class="TabsContainer">
                                            <asp:PlaceHolder ID="TabsContainer" runat="server">
                                                <div class="UITab NormalTabStyle">
                                                    <% String className = "NormalTab";
                                                       if (getSelectedTab().Equals("0"))
                                                       {
                                                           className = "SelectedTab";
                                                       }
                                                    %>
                                                    <div id="UITab0" class="<%=className %>">
                                                        <div class="LeftTab">
                                                            <div class="RightTab">
                                                                <div class="MiddleTab">
                                                                    <asp:LinkButton CssClass="NormalLink" ID="TabValue0" runat="server" CausesValidation="false"
                                                                        OnClick="ChangeTabIndex">
                                                                        Danh sách hội dồng
                                                                    </asp:LinkButton>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="UITab NormalTabStyle">
                                                    <%
                                                        className = "NormalTab";
                                                        if (getSelectedTab().Equals("1"))
                                                        {
                                                            className = "SelectedTab";
                                                        }
                                                    %>
                                                    <div id="UITab1" class="<%=className %>">
                                                        <div class="LeftTab">
                                                            <div class="RightTab">
                                                                <div class="MiddleTab">
                                                                    <asp:LinkButton CssClass="NormalLink" ID="TabValue1" runat="server" CausesValidation="false"
                                                                        OnClick="ChangeTabIndex">
                                                                Danh sách thành viên
                                                                    </asp:LinkButton>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </asp:PlaceHolder>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div style="clear: left;">
                            <span></span>
                        </div>
                        <asp:PlaceHolder ID="UITabContentContainer" runat="server">
                            <div class="UITabContentContainer">
                                <div class="THIO_Wizard">
                                    <%
                                        String styleDisplay = "none";
                                        if (getSelectedTab().Equals("0"))
                                        {
                                            styleDisplay = "block";
                                        }
                                    %>
                                    <div id="UITabContent0" class="UITabContent" style="display: <%=styleDisplay %>">
                                        <asp:Panel ID="PanelDanhsachhoidong" runat="server">
                                            <asp:GridView ID="memberListView" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                                                DataSourceID="memberListData" DataKeyNames="MaHoiDong" PageSize="10" CssClass="Grv"
                                                TabIndex="3">
                                                <Columns>
                                                    <asp:BoundField DataField="MaHoiDong" Visible="false" />
                                                    <asp:BoundField DataField="TenHoiDong" HeaderText="T&#234;n Hội Đồng" />
                                                    <asp:BoundField DataField="MaDoanhNghiep" Visible="false" />
                                                    <asp:BoundField DataField="TenDoanhNghiep" HeaderText="T&#234;n Doanh Nghiệp" />
                                                    <asp:BoundField DataField="NgayThanhLap" HeaderText="Ng&#224;y th&#224;nh lập" DataFormatString="{0:dd/MM/yyyy}"
                                                        HtmlEncode="False" />
                                                    <asp:BoundField DataField="QuyetDinh" HeaderText="Quyết định" />
                                                    <asp:BoundField DataField="NguoiKy" HeaderText="Người k&#253;" />
                                                </Columns>
                                                <PagerStyle CssClass="GrvPagerStyle" />
                                                <HeaderStyle CssClass="GrvHeader" />
                                                <RowStyle CssClass="GrvRowStyle" />
                                                <AlternatingRowStyle CssClass="GrvAlternatingRowStyle" />
                                            </asp:GridView>
                                            <asp:SqlDataSource ID="memberListData" runat="server" ConnectionString="<%$ConnectionStrings:evaConn %>"
                                                SelectCommand="select * from hoidong inner join doanhnghiep on hoidong.madoanhnghiep= doanhnghiep.madoanhnghiep">
                                            </asp:SqlDataSource>
                                        </asp:Panel>
                                    </div>
                                    <%
                                        styleDisplay = "none";
                                        if (getSelectedTab().Equals("1"))
                                        {
                                            styleDisplay = "block";
                                        }
                                    %>
                                    <div id="UITabContent1" class="UITabContent" style="display: <%=styleDisplay %>">
                                        <asp:Panel ID="Panel1" runat="server">
                                            <div class="">
                                            <label>Chỉ mục</label>
                                             <asp:DropDownList ID="cb_memberFilterType" runat="server"
                                              DataValueField="key" DataTextField="value" DataSourceID="memberFilterTypeData"
                                              AutoPostBack="true" OnSelectedIndexChanged="changeType">
                                               
                                             </asp:DropDownList>
                                             <asp:DropDownList ID="cb_memberFilter" AutoPostBack="true" OnSelectedIndexChanged="changeFilter" DataValueField="key" DataTextField="value" runat="server">
                                             
                                             </asp:DropDownList>
                                              <asp:SqlDataSource ID="memberFilterTypeData" runat="server"
                                              ConnectionString="<%$ConnectionStrings:evaConn %>"
                                              SelectCommand ="select 1 as [key], N'Doanh nghiệp' as [value] union select  0 as [key], N'Hội dồng' as [value] union select  -1 as [key], N'Chọn một' as [value]"
                                             >
                                             </asp:SqlDataSource>
                                             <asp:SqlDataSource ID="cucilDataFilterList" runat="server"
                                              ConnectionString="<%$ConnectionStrings:evaConn %>"
                                              SelectCommand ="select mahoidong as [key], tenhoidong as [value] from hoidong union select 0, N'Chọn một hội dồng'"
                                             >
                                             
                                             </asp:SqlDataSource>
                                              <asp:SqlDataSource ID="companyDataFilterList" runat="server"
                                               ConnectionString="<%$ConnectionStrings:evaConn %>"
                                              SelectCommand ="select madoanhnghiep as [key], tendoanhnghiep as [value] from doanhnghiep union select 0, N'Chọn một doanh nghiệp'"
                                              >
                                             
                                             </asp:SqlDataSource>
                                             
                                            </div>
                                            <asp:GridView ID="thanhvienDataView" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                                                DataSourceID="thanhvienData" DataKeyNames="mathanhvien" PageSize="10" CssClass="Grv"
                                                TabIndex="3">
                                                <Columns>
                                                    <asp:BoundField DataField="mathanhvien" Visible="false" />
                                                    <asp:BoundField DataField="tenthanhvien" HeaderText="Tên thành viên" />
                                                    <asp:BoundField DataField="MaDoanhNghiep" Visible="false"  />
                                                    <asp:BoundField DataField="mahoidong" Visible="false"  />
                                                    <asp:BoundField DataField="TenDoanhNghiep" HeaderText="Thuộc doanh nghiệp" />
                                                    <asp:BoundField DataField="tenvitri" HeaderText=" Vị trí công tác" 
                                                        HtmlEncode="False" />
                                                     
                                                </Columns>
                                                <PagerStyle CssClass="GrvPagerStyle" />
                                                <HeaderStyle CssClass="GrvHeader" />
                                                <RowStyle CssClass="GrvRowStyle" />
                                                <AlternatingRowStyle CssClass="GrvAlternatingRowStyle" />
                                            </asp:GridView>
                                            <asp:SqlDataSource ID="thanhvienData" runat="server" ConnectionString="<%$ConnectionStrings:evaConn %>"
                                                SelectCommand="select thanhvien.mathanhvien, tenthanhvien,doanhnghiep.MaDoanhNghiep,doanhnghiep.tendoanhnghiep, hoidongchamdiem.mahoidong, tenvitri from thanhvien inner join doanhnghiep on thanhvien.madoanhnghiep = doanhnghiep.madoanhnghiep
inner join hoidongchamdiem on thanhvien.mathanhvien = hoidongchamdiem.mathanhvien
inner join hoidong on hoidong.mahoidong = hoidongchamdiem.mahoidong
inner join vitri on thanhvien.mavitri = vitri.mavitri where thanhvien.status =1 and doanhnghiep.status=1 and hoidong.status=1 and (doanhnghiep.madoanhnghiep=@madoanhnghiep or hoidongchamdiem.mahoidong=@mahoidong) "
  
>
<SelectParameters >
 <asp:ControlParameter Name="madoanhnghiep" PropertyName="SelectedValue" ControlID="cb_memberFilter" />
 <asp:ControlParameter Name="mahoidong" PropertyName="SelectedValue" ControlID="cb_memberFilter" />
</SelectParameters>
 


                                            </asp:SqlDataSource>
                                        </asp:Panel>
                                    </div>
                                </div>
                            </div>
                        </asp:PlaceHolder>
                    </div>
                </div>
            </div>
        </div>
        
    </asp:Panel>
</asp:Content>
